package com.xxx.constant;

/**
 * redis相关常量类
 * 
 * 
 * 
 */
public class RedisConstants {
	
	/**
	 * redis key前缀
	 */
	private static final String REDIS_KEY_PREFIX = "xxx:";

	/**
	 * test key
	 */
	public static final String REDIS_KEY_TEST = REDIS_KEY_PREFIX + "test:{0}";

	/**
	 * 用户ID
	 * {0}为日期YYYYMMDD
	 * {1}为userId
	 */
	public static final String USERID = "userId:{0}:{1}";

	/**
	 * 用户登录token
	 * {0}为token
	 */
	public static final String REDIS_KEY_TOKEN = REDIS_KEY_PREFIX + "token:{0}";
	
	/**
	 * 短信验证码
	 * {0}为手机号
	 */
	public static final String REDIS_KEY_VERICODE_SMS = REDIS_KEY_PREFIX + "vericode:sms:{0}";
	
	/**
	 * 图片验证码
	 * {0}为uuid
	 */
	public static final String REDIS_KEY_VERICODE_IMG = REDIS_KEY_PREFIX + "vericode:img:{0}";

	/**
	 * 短链接 key
	 */
	public static final String REDIS_KEY_SHORTURL = REDIS_KEY_PREFIX + "{0}";
}
